﻿//AcademicPlanner - course registration planning web app.
//Copyright (C) 2009  Boubacar Diallo

//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
//as published by the Free Software Foundation; either version 2
//of the License, or (at your option) any later version.

//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU General Public License for more details.

//You should have received a copy of the GNU General Public License
//along with this program; if not, write to the Free Software
//Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.


using System;

namespace AcademicPlanner.Domain
{
	/// <summary>
	/// List of application level error codes in the domain layer of
	/// the AcademicPlanner application.
	/// </summary>
	/// <version>1.0</version>
	/// <since>1.0</since>
	public enum DomainErrorCode
	{
		NONE,
		// General
		G_SAVE_ENTITY_FAILURE,
		G_RELOAD_ENTITY_FAILURE,

		// Components
		C_NOT_UNIQUE_PERSON_EMAIL,
		C_NOT_AUTHORIZED_CREATE_PERSON,
		C_REGISTRATION_EMAIL_FAILURE,
		C_ADD_ACOBJECT_TOKEN_FAILURE,
		C_PERSON_TO_SETUP_NOT_FOUND,
		C_PERSON_ALREADY_SETUP,
		C_NOT_AUTHORIZED_CREATE_ACCOUNT,
		C_NOT_UNIQUE_ACCOUNT_USER_NAME,
		C_INVALID_PERSON_ACCOUNT_PROPERTIES,
		C_ADD_ACOBJECT_FAILURE,
		C_PERSON_TO_SAVE_NOT_FOUND,
		C_NOT_AUTHORIZED_SETUP_PERSON,
		C_NOT_AUTHORIZED_UPDATE_ACCOUNT,
		C_NOT_AUTHORIZED_UPDATE_PERSON,
		C_ACCOUNT_TO_SAVE_NOT_FOUND,
		C_PERSON_TO_HELP_RECOVER_ACCOUNT_NOT_FOUND,
		C_ACCOUNT_RECOVERY_EMAIL_FAILURE,
		C_PERSON_TO_RESET_ACCOUNT_NOT_FOUND,
		C_NOT_AUTHORIZED_RESET_PERSON_ACCOUNT,
		C_ACCOUNT_TO_RESET_NOT_FOUND,
		C_NOT_UNIQUE_PLANNER_USER_NAME,
		C_ACADEMICPLAN_TO_SAVE_NOT_FOUND,
		C_NOT_AUTHORIZED_UPDATE_ACADEMICPLAN,
		C_INVALID_ACADEMICPLAN_DIVISIONS_PROPERTIES,
		C_INVALID_ACADEMICPLAN_DIVISIONS_CATEGORIES_PROPERTIES,
		C_INVALID_ACADEMICPLAN_TERMS_PROPERTIES,
		C_ACADEMICPLAN_TO_SAVE_NEW_PROGRAM_UNDER_NOT_FOUND,
		C_NOT_AUTHORIZED_CREATE_PROGRAM,
		C_NOT_AUTHORIZED_UPDATE_PROGRAM,
		C_PROGRAM_TO_SAVE_NOT_FOUND,
		C_NOT_AUTHORIZED_DELETE_PROGRAM,
		C_PROGRAM_TO_DELETE_NOT_FOUND,
		C_ACADEMICPLAN_TO_SAVE_NEW_COURSE_UNDER_NOT_FOUND,
		C_NOT_AUTHORIZED_CREATE_COURSE,
		C_NOT_PRESENT_COURSE_CATEGORY,
		C_COURSE_TO_SAVE_NOT_FOUND,
		C_NOT_AUTHORIZED_UPDATE_COURSE,
		C_NOT_AUTHORIZED_DELETE_COURSE,
		C_COURSE_TO_DELETE_NOT_FOUND,
		C_NOT_PRESENT_ACADEMICSCHDULE_PROGRAM,
		C_NOT_AUTHORIZED_CREATE_ACADEMICSCHEDULE,
		C_ACADEMICPLAN_TO_SAVE_NEW_ACADEMICSCHEDULE_UNDER_NOT_FOUND,
		C_NOT_AUTHORIZED_DELETE_ACADEMICSCHEDULE,
		C_ACADEMICSCHEDULE_TO_DELETE_NOT_FOUND,
		C_NOT_AUTHORIZED_UPDATE_ACADEMICSCHEDULE,
		C_ACADEMICSCHEDULE_TO_SAVE_NOT_FOUND,
		C_NOT_PRESENT_ACADEMICSCHDULE_STARTTERM,
		C_ACADEMICSCHEDULE_TO_SAVE_REGISTRATIONS_OF_NOT_FOUND,
		C_INVALID_ACADEMICSCHEDULE_REGISTRATIONS_XML_FORMAT,
		C_NOT_PRESENT_REGISTRATION_COURSE,
		C_INVALID_ACADEMICSCHEDULE_REGISTRATIONS_PROPERTIES,
		C_ASSIGN_ROLE_TO_USER_FAILURE,

		// Models
		M_ENTITY_RETRIEVAL_BY_ID_FAILURE,
		M_INVALID_PERSON_PROPERTIES,
		M_PERSON_ENTITY_RETRIEVAL_BY_EMAIL_FAILURE,
		M_ACCOUNT_ENTITY_RETRIEVAL_BY_USER_NAME_FAILURE,
		M_INVALID_USER_PROPERTIES,
		M_INVALID_ACCOUNT_USER_PROPERTIES,
		M_PERSON_ENTITY_RETRIEVAL_BY_ACCOUNT_USER_NAME_FAILURE,
		M_NOT_AUTHORIZED_VIEW_PERSON_NAME,
		M_NOT_AUTHORIZED_VIEW_PERSON_EMAIL,
		M_NOT_AUTHORIZED_VIEW_USER_NAME,
		M_PLANNER_ENTITY_RETRIEVAL_BY_USER_NAME_FAILURE,
		M_NOT_AUTHORIZED_VIEW_ACADEMICPLAN_CREDITUNITS,
		M_NOT_AUTHORIZED_VIEW_ACADEMICPLAN_DIVISIONS,
		M_INVALID_ACADEMICPLAN_PROPERTIES,
		M_INVALID_COURSECATEGORY_PROPERTIES,
		M_INVALID_COURSEDIVISION_PROPERTIES,
		M_NOT_AUTHORIZED_VIEW_ACADEMICPLAN_TERMS,
		M_INVALID_ACADEMICTERM_PROPERTIES,
		M_INVALID_PROGRAM_PROPERTIES,
		M_NOT_UNIQUE_PERSON_ACCOUNTS_USER_NAME,
		M_NOT_UNIQUE_ACADEMICPLAN_PROGRAMS_NAME,
		M_NOT_AUTHORIZED_VIEW_PROGRAM_NAME,
		M_NOT_AUTHORIZED_VIEW_PROGRAM_MINIMUMCREDITS,
		M_COURSE_ENTITIES_RETRIEVAL_BY_ACADEMICPLAN_ENTITY_ID_FAILURE,
		M_NOT_UNIQUE_ACADEMICPLAN_COURSES_NAME,
		M_NOT_AUTHORIZED_VIEW_COURSE_NAME,
		M_INVALID_COURSE_PROPERTIES,
		M_NOT_UNIQUE_ACADEMICPLAN_COURSES_NUMBER,
		M_NOT_AUTHORIZED_VIEW_COURSE_NUMBER,
		M_NOT_AUTHORIZED_VIEW_COURSE_CREDITS,
		M_INVALID_COURSEDIVISION_CATEGORIES_PROPERTIES,
		M_INVALID_ACADEMICPLAN_DIVISIONS_PROPERTIES,
		M_INVALID_ACADEMICPLAN_TERMS_PROPERTIES,
		M_INVALID_ACADEMICPLAN_PROGRAMS_PROPERTIES,
		M_INVALID_ACADEMICPLAN_COURSES_PROPERTIES,
		M_INVALID_ACADEMICSCHEDULE_PROPERTIES,
		M_INVALID_ACADEMICPLAN_SCHEDULES_PROPERTIES,
		M_NOT_AUTHORIZED_VIEW_ACADEMICSCHEDULE_NAME,
		M_NOT_AUTHORIZED_VIEW_ACADEMICSCHEDULE_STARTYEAR,
		M_INVALID_REGISTRATION_PROPERTIES,
		M_INVALID_ACADEMICSCHEDULE_REGISTRATIONS_PROPERTIES,
		M_REGISTRATIONENTITY_RETRIEVAL_BY_ANTERIOR_PERIODENTITY_FAILURE,
		M_ENTITY_COLLECTION_PAGINATION_SETUP_FAILURE
	}
}
